<template>
	<view class="detail">
		<image src="../../static/school.png" mode="" class="detail-image"></image>
		<view class="detail-content">
			<view class="detail-text1">
				<view v-html="schoolDetail.desc"></view>
			</view>
			<!-- <view style="margin-top: 40rpx;">
				<u-steps :list="numList" :current="4"></u-steps>
			</view>
			<view class="detail-title">求学价值</view>
			<view class="detail-title">就业报告</view>
			<view class="detail-title">招生概要</view>
			<view class="detail-title">校园风光</view>
			<view class="detail-title">联系方式</view> -->
		</view>
		<view class="detail-bar">
			<view class="detail-bar-item" @click="goto('../pages/enterData')">
				<image src="../../static/arrow-up.png" mode=""></image>
				<view>院校录取数据</view>
			</view>
			<view class="detail-bar-item" @click="goto('../pages/majorDetail')">
				<image src="../../static/wenjian.png" mode=""></image>
				<view>专业录取数据</view>
			</view>
			<view class="detail-bar-item detail-img" @click="goto('../pages/studentPlan')">
				<image src="../../static/student.png" mode=""></image>
				<view>招生计划</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				numList: [{
					name: '下单'
				}, {
					name: '出库'
				}, {
					name: '运输'
				}, {
					name: '签收'
				}],
				schoolDetail: '',
				school_batch_type: '',
				schoolName: ''
			}
		},
		onLoad(options) {
			this.analyze_detail(options.school_code, options.school_batch, options.school_batch_type);
		},
		methods: {
			goto(name) {
				uni.navigateTo({
					url: name+"?school_code="+this.schoolDetail.school_code+"&school_batch_type="+this.school_batch_type+"&school_title="+this.schoolName
				});
			},
			// 获取学校数据
			analyze_detail(school_code, school_batch, school_batch_type) {
				this.http({
					url: `api/v1/choose_school/analyze_detail`,
					method: 'POST',
					data: {
						analyze_type: "1",
						school_batch_type: school_batch_type,
						school_code: school_code
					},
					success: res => {
						if (res.errcode == 0) {
							this.schoolDetail = res.result.school_detail;
							this.school_batch_type = res.result.school_result.school_batch;
							this.schoolName = res.result.school_result.title;
						}
					}
				})
			}
		}
	}
</script>

<style lang="less" scoped>
	.detail {
		padding-bottom: 100rpx;
	}
	.detail-image {
		width: 100%;
		height: 300rpx;
	}

	.detail-content {
		padding: 30rpx;

		.detail-title {
			font-weight: bold;
			margin: 30rpx 0;
		}
	}
	.detail-text1 {
		// word-break: break-all;
		// text-overflow: ellipsis;
		// overflow: hidden;
		// display: -webkit-box;
		// -webkit-line-clamp: 2;
		// -webkit-box-orient: vertical;
	}
	.detail-bar {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-around;
		background-color: #1bb675;
		width: 100%;
		position: fixed;
		bottom: 0;

		.detail-bar-item {
			text-align: center;
			color: #FFFFFF;
			padding: 6rpx 0;
			line-height: 1.2;
			font-size: 24rpx;

			image {
				width: 50rpx;
				height: 50rpx;
			}
		}
		.detail-img {
			image {
				width: 44rpx;
				height: 44rpx;
				margin-bottom: 4rpx;
				margin-top: 3rpx;
			}
		}
	}
</style>
